//
//  Database.h
//  test
//
//  Created by Ruj on 11/14/13.
//  Copyright (c) 2013 Ruj. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <sqlite3.h>
#import "DriveData.h"

@interface Database : NSObject
{
    NSString *databasePathString;
    sqlite3 *database;
    sqlite3_stmt *statement;
}

+(Database*)getSharedInstance;

// Create record and return the record number
-(NSInteger)createRecord:(NSDate*)date;

// Record driving force
-(BOOL) saveRecordData:(NSInteger) recordID
             timestamp:(NSDate*) timestamp
              location:(CLLocation*) location
                 force:(double)force;

// Find records to display in Table
-(NSDate*)getDriveRecord:(NSInteger) recordID;

// Count number of records
-(NSInteger)countRecords;

// Find drive record detail to display in Map
-(NSMutableArray*)getDriveRecordDetail:(NSInteger) recordID;

@end
